Repository navigation
fix(WebSecurityConfig): Session renewal requires sign-in, so an ended session is never told it ended - #370
Merged
hirokiterashima merged 1 commit intoNov 17, 2026
Conversation
… session is never told it ended LoginController.renewSession() answers "false" when nobody is signed in, which is how the client learns that the session has ended. Since the Spring Boot 3 upgrade (WISE-Community#311) every path that matches no rule requires authentication, and /api/session/renew matches none, so a request whose session has ended is redirected to the sign-in page and never receives "false". The path is added to the permitted paths.
hirokiterashima
approved these changes
Nov 17, 2026
hirokiterashima
left a comment
Member
There was a problem hiding this comment.
LGTM. Thanks for catching this issue.
Member
|
🎉 This PR is included in version 1.27.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LoginController.renewSession()answersfalsewhen nobody is signed in, and the client'sSessionServicesigns the user out when it receivesfalse. Since the Spring Boot 3 upgrade (#311),WebSecurityConfigends withanyRequest().authenticated(), and/api/session/renewmatches none of the permitted paths, so a request whose session has already ended is redirected to the sign-in page instead of reaching the controller. Thefalsebranch can no longer be reached.For users this means a session that has ended on the server, for example after the session timeout or a server restart, is not noticed by the page that is open. The page keeps showing the unit, and the next save or request fails instead of the user being sent to sign in again.
Changes
/api/session/renewis added to the permitted paths. The controller already handles an anonymous request; it only reports whether a session exists.Test
WebSecurityConfigAuthorizationTest: an unauthenticatedGET /api/session/renewanswersfalse. The body is checked rather than the status, because the redirect to the sign-in page is not a 403 and would pass a status check. Against the currentdevelopit fails withexpected: <false> but was: <>.WebSecurityConfigAuthorizationTest(17) andLoginControllerTestpass.